import { IsNotEmpty, Length, IsString, IsNumber, IsOptional, Min, IsArray, ArrayMinSize, ArrayMaxSize, MaxLength, IsObject } from 'class-validator';
import PaginationDto from '../../dtos/pagination.dto';

export default class Dto {
    @MaxLength(50)
    @IsNotEmpty()
    @IsString({})
    name:string;

    @IsArray({})
    @IsOptional()
    attrs:number[];

    @IsArray({})
    @IsOptional()
    settings:number[];


    @MaxLength(100)
    @IsString({})
    @IsOptional()
    remark:string;
}

export class AddDto extends Dto {
    
}


export class UpdateDto extends Dto {
    
}

export class PageDto extends PaginationDto {
    
    @MaxLength(30)
    @IsString({})
    @IsOptional()
    name:string;
}